package cn.sylinx.horm.proxy.mapper.interceptor;

import cn.sylinx.horm.config.OrmConfigHolder;
import cn.sylinx.horm.interceptor.InterceptorManager;
import cn.sylinx.horm.interceptor.Invocation;

class MapperInterceptorManager extends InterceptorManager<MapperInterceptor> {

    static MapperInterceptorManager INSTANCE = new MapperInterceptorManager(MapperInterceptor.class);

    private MapperInterceptorManager(Class<MapperInterceptor> clazz) {
        super(clazz);
    }

    @Override
    protected MapperInterceptor getFromConfig() {
        return OrmConfigHolder.getMapperInterceptor();
    }

    @Override
    protected MapperInterceptor getDefault() {
        return Invocation::proceed;
    }
}
